package com.example.togethermove.ui.fragment;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;

import androidx.fragment.app.Fragment;


import com.example.togethermove.R;
import com.example.togethermove.base.BaseFragment;
import com.example.togethermove.ui.activity.honor.ApplyPKActivity;
import com.example.togethermove.ui.activity.masterSportsman.InformActivity;
import com.example.togethermove.ui.activity.masterSportsman.SearchActivity;
import com.example.togethermove.ui.activity.mine.CollectRecordActivity;
import com.example.togethermove.ui.activity.mine.FriendListActivity;
import com.example.togethermove.ui.activity.mine.InformationListActivity;
import com.example.togethermove.ui.activity.mine.MyCupActivity;
import com.example.togethermove.ui.activity.mine.MyMedalActivity;
import com.example.togethermove.ui.activity.mine.MyOrderActivity;
import com.example.togethermove.ui.activity.mine.PersonHomePageActivity;
import com.example.togethermove.ui.activity.mine.SetEverydaySportActivity;
import com.example.togethermove.ui.activity.mine.SettingActivity;
import com.example.togethermove.ui.activity.togetherMove.SportRecordDetailActivity;

import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import butterknife.Unbinder;
import io.reactivex.annotations.Nullable;

/**
 * @ClassName: HomeFragment
 * @Author: csl
 * @Date:
 * @Description: 我的界面
 */
public class MineFragment extends BaseFragment {

    Unbinder unbinder;
    @BindView(R.id.tv_name)
    TextView tvName;
    @BindView(R.id.icon_mine_message)
    ImageView icon_mine_message;
    @BindView(R.id.icon_mine_setting)
    ImageView icon_mine_setting;

    @BindView(R.id.lin_mine_attention)//关注
    LinearLayout lin_mine_attention;
    @BindView(R.id.lin_mine_homepage)//主页
    LinearLayout lin_mine_collect;
    @BindView(R.id.lin_mine_comment)//评论
    LinearLayout lin_mine_comment;
    @BindView(R.id.lin_mine_fans)//粉丝
    LinearLayout lin_mine;

    @BindView(R.id.tv_mine_attention)//关注
            TextView tv_mine_attention;
    @BindView(R.id.tv_mine_praise)//主页
            TextView tv_mine_praise;
    @BindView(R.id.tv_mine_commetition)//评论
            TextView tv_mine_commetition;
    @BindView(R.id.tv_mine_fans)//粉丝
            TextView tv_mine_fans;



    @BindView(R.id.lin_my_collect)
    LinearLayout lin_my_collect;
    @BindView(R.id.lin_my_dynamic)
    LinearLayout lin_my_dynamic;
    @BindView(R.id.lin_my_sport_record)//运动记录
    LinearLayout lin_my_address;
    @BindView(R.id.lin_my_order_form)//订单
    LinearLayout lin_my_order_form;
    @BindView(R.id.lin_my_medal)//我的勋章
    LinearLayout lin_my_medal;
    @BindView(R.id.lin_my_cup)
    LinearLayout lin_my_cup;
    @BindView(R.id.lin_my_pk)
    LinearLayout lin_my_pk;
    @BindView(R.id.lin_my_plan)
    LinearLayout lin_my_plan;



//    HomeListDoc doc;
//    BillListAdapter billListAdapter;
    private boolean isLoading = false;
    private String wallet = "";
    private String headurl = "";
    private String coins = "";
//    public int images[] = new int[]{R.mipmap.banner_invite, };//R.mipmap.banner_introduce
    List<String> mImg = new ArrayList<>();
//    List<HomeVideoListBean> mlist;
//    List<HomeVideoListBean> mlistall;

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        super.onCreateView(inflater, container, savedInstanceState);
        View view = inflater.inflate(R.layout.fragment_mine, null);
        unbinder = ButterKnife.bind(this, view);
//        mlistall = new ArrayList<>();
        mImg.add("1");
        mImg.add("2");

        return view;
    }

    @Override
    protected View getSuccessView() {
        return null;
    }

    @Override
    public Object requestData() {
        return null;
    }















    @OnClick({R.id.icon_mine_message, R.id.icon_mine_setting,
            R.id.lin_mine_attention, R.id.lin_mine_homepage,R.id.lin_mine_comment,R.id.lin_mine_fans,
            R.id.lin_my_collect, R.id.lin_my_dynamic,R.id.lin_my_sport_record,R.id.lin_my_order_form,
            R.id.lin_my_medal, R.id.lin_my_cup,R.id.lin_my_pk,R.id.lin_my_plan,})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.icon_mine_message: //跳动消息列表
                toNewActivity(InformationListActivity.class);


                break;
            case R.id.icon_mine_setting:
                toNewActivity(SettingActivity.class);
                break;


            case R.id.lin_mine_attention://关注
                toNewActivity(FriendListActivity.class);

                break;
            case R.id.lin_mine_comment://评论
                toNewActivity(FriendListActivity.class);
                break;


            case R.id.lin_mine_homepage:
                toNewActivity(PersonHomePageActivity.class);
                break;


            case R.id.lin_my_collect://我的收藏
                toNewActivity(CollectRecordActivity.class);
                break;
            case R.id.lin_my_dynamic://我的动态
                toNewActivity(PersonHomePageActivity.class);
                break;
            case R.id.lin_my_sport_record://运动记录
                toNewActivity(SportRecordDetailActivity.class);
                break;
            case R.id.lin_my_order_form://我的订单
                toNewActivity(MyOrderActivity.class);
                break;
            case R.id.lin_my_medal://我的勋章
                toNewActivity(MyMedalActivity.class);
                break;
            case R.id.lin_my_cup:
                toNewActivity(MyCupActivity.class);
                break;
            case R.id.lin_my_pk://我的PK
                toNewActivity(ApplyPKActivity.class);
                break;
            case R.id.lin_my_plan://我的目标
                toNewActivity(SetEverydaySportActivity.class);
                break;
        }
    }








    }




